﻿using System;
using System.Text.Json.Serialization;

namespace LF.Shared.Dtos.Input
{
	public class ChapterInput
	{
        /// <summary>
        /// 通知ID
        /// </summary>
		public string Id { get; set; }
        /// <summary>
        /// 通知创建时间
        /// </summary>
		[JsonPropertyName("create_time")]
		public string CreatTime { get; set; }
        /// <summary>
        /// 通知类型
        /// 示例值 TRANSACTION.SUCCESS
        /// </summary>
        [JsonPropertyName("event_type")]
        public string EventType { get; set; }
        /// <summary>
        /// 通知数据类型
        /// </summary>
        [JsonPropertyName("resource_type")]
        public string ResourceType { get; set; }
        /// <summary>
        /// 回调摘要
        /// </summary>
        public string summary { get; set; }

        /// <summary>
        /// 通知数据
        /// </summary>
        public Resource Resource { get; set; }
        public bool IsSuccess => EventType.ToLower().Contains("success");


    }
    public class Resource
    {
        /// <summary>
        /// 加密算法类型
        /// </summary>
        public string Algorithm { get; set; }
        /// <summary>
        /// 数据密文
        /// </summary>
        public string Ciphertext { get; set; }
        /// <summary>
        /// 附加数据
        /// </summary>
        [JsonPropertyName("associated_data")]
        public string AssociatedData { get; set; }
        /// <summary>
        /// 原始类型
        /// </summary>
        [JsonPropertyName("original_type")]
        public string OriginalType { get; set; }
        /// <summary>
        /// 随机串
        /// </summary>
        public string Nonce { get; set; }
       
    }


}

